package amani.wechat.platform.services.impl;

import java.util.List;

//import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import amani.wechat.platform.services.ICommonService;
import amani.wechat.platform.webserviceClient.ArrayOfSpadDconsumeInfo;
import amani.wechat.platform.webserviceClient.Cardinfo;
import amani.wechat.platform.webserviceClient.CategoryinfoId;
import amani.wechat.platform.webserviceClient.CommonServicePortType;
import amani.wechat.platform.webserviceClient.Companyinfo;
import amani.wechat.platform.webserviceClient.Evaluation;
import amani.wechat.platform.webserviceClient.Goodsinfo;
import amani.wechat.platform.webserviceClient.Nointernalcardinfo;
import amani.wechat.platform.webserviceClient.Projectinfo;
import amani.wechat.platform.webserviceClient.Roominfo;
import amani.wechat.platform.webserviceClient.SpadDconsumeInfo;
import amani.wechat.platform.webserviceClient.SpadMconsumeInfo;
import amani.wechat.platform.webserviceClient.Vouchersdetal;
import amani.wechat.platform.webserviceClient.Wxbandcard;

@Service("CommonService")
public class CommonService implements ICommonService {
	//private static Logger logger = Logger.getLogger(ConfigurationService.class);
	private static CommonServicePortType commonserviceProxy;

	static {
		amani.wechat.platform.webserviceClient.CommonService cs = new amani.wechat.platform.webserviceClient.CommonService();
		commonserviceProxy = cs.getCommonServiceHttpPort();
	}

	public CommonService() {

	}

	@Override
	public Companyinfo loadCompanyinfo(String strCompId) {
		return commonserviceProxy.loadCompanyinfo(strCompId);
	}

	@Override
	public List<Companyinfo> loadAllCompanyinfo() {
		return commonserviceProxy.loadAllCompanyinfo().getCompanyinfo();
	}

	@Override
	public List<Projectinfo> loadProjectinfo(String strCompId) {
		return commonserviceProxy.loadProjectinfo(strCompId).getProjectinfo();
	}

	@Override
	public List<Goodsinfo> loadAllGoodinfo() {
		return commonserviceProxy.loadAllGoodinfo().getGoodsinfo();
	}

	@Override
	public String loadStaffinfo(String strCompId, String itemNo) {

		return commonserviceProxy.loadStaffinfo(strCompId, itemNo);
	}

	@Override
	public List<CategoryinfoId> loadCategory(String strCompId) {

		return commonserviceProxy.loadCategory(strCompId).getCategoryinfoId();
	}

	@Override
	public List<Roominfo> loadRoomInfo(String strCompId) {

		return commonserviceProxy.loadRoomInfo(strCompId).getRoominfo();
	}

	@Override
	public List<String> loadMirror(String strCompId) {

		return commonserviceProxy.loadMirror(strCompId).getString();
	}

	@Override
	public List<Cardinfo> loadCardInfos(String strPhone, String strCardNo) {

		return commonserviceProxy.loadCardInfos(strPhone, strCardNo)
				.getCardinfo();
	}

	@Override
	public Cardinfo loadCardInfo(String strCompId, String strCardNo) {

		return commonserviceProxy.loadCardInfo(strCompId, strCardNo);
	}

	@Override
	public boolean saveIPADBillInfo(SpadMconsumeInfo spadMconsumeInfo,
			List<SpadDconsumeInfo> spadDconsumeInfo) {
		ArrayOfSpadDconsumeInfo spadDconsumeInfoArray = new ArrayOfSpadDconsumeInfo();
		spadDconsumeInfoArray.getSpadDconsumeInfo().addAll(spadDconsumeInfo);
		return commonserviceProxy.saveIPADBillInfo(spadMconsumeInfo,
				spadDconsumeInfoArray);
	}

	@Override
	public String loadVouchers() {

		return commonserviceProxy.loadVouchers();
	}

	@Override
	public String loadDqyNo(String strOpenId, String strClientName,
			String strMobile, String strVchNo, String strBillId) {

		return commonserviceProxy.loadDqyNo(strOpenId, strClientName,
				strMobile, strVchNo, strBillId);
	}

	@Override
	public String loadCardAccount(String strCardNo) {

		return commonserviceProxy.loadCardAccount(strCardNo);
	}

	@Override
	public String loadCardproaccounts(String strCompId, String strCardNo) {

		return commonserviceProxy.loadCardproaccounts(strCompId, strCardNo);
	}

	@Override
	public String loadcCardaccountchangehistories(String strCardNo) {

		return commonserviceProxy.loadcCardaccountchangehistories(strCardNo);
	}

	@Override
	public boolean updateCardPassword(String strCardNo, String strPassword) {

		return commonserviceProxy.updateCardPassword(strCardNo, strPassword);
	}

	@Override
	public boolean checkCardPassword(String strCardNo, String strPassword) {

		return commonserviceProxy.checkCardPassword(strCardNo, strPassword);
	}

	@Override
	public List<Vouchersdetal> loadVouchersdetalsById(String strVchNo) {

		return commonserviceProxy.loadVouchersdetalsById(strVchNo)
				.getVouchersdetal();
	}

	@Override
	public Wxbandcard loadWxbandcard(String strCardNo, String strOperId) {

		return commonserviceProxy.loadWxbandcard(strCardNo, strOperId);
	}

	@Override
	public boolean checkDyqNo(String strDyqNo) {

		return commonserviceProxy.checkDyqNo(strDyqNo);
	}

	@Override
	public String lsDnointernalcardinfos(String strDyqNo) {

		return commonserviceProxy.lsDnointernalcardinfos(strDyqNo);
	}

	@Override
	public Nointernalcardinfo loadNointernalcardinfo(String strDyqNo) {

		return commonserviceProxy.loadNointernalcardinfo(strDyqNo);
	}

	@Override
	public String loadwWeixinclents(String strOperId) {

		return commonserviceProxy.loadwWeixinclents(strOperId);
	}

	@Override
	public boolean wxPost(String strCompId, String strBillId, String strDate) {

		return commonserviceProxy.wxPost(strCompId, strBillId, strDate);
	}

	@Override
	public boolean saveEvaluation(String billid, String operid,
			double discount, String content, double amt) {

		return commonserviceProxy.saveEvaluation(billid, operid, discount,
				content, amt);
	}

	@Override
	public Evaluation loadEvaluation(String operid, String billid) {

		return commonserviceProxy.loadEvaluation(operid, billid);
	}

	@Override
	public boolean saveOrders(String strCompId, String strBillId,
			String strCardNo, String orderPhone, String strDate,
			String strTime, String openid, int billType, String complydetail) {

		return commonserviceProxy.saveOrders(strCompId, strBillId, strCardNo,
				orderPhone, strDate, strTime, openid, billType, complydetail);
	}

	@Override
	public boolean saveOrderPrjInfo(String strCompId, String strBillId,
			String strPrjInfo, String strPrjName) {

		return commonserviceProxy.saveOrderPrjInfo(strCompId, strBillId,
				strPrjInfo, strPrjName);
	}

	@Override
	public boolean saveOrderEmpInfo(String strCompId, String strBillId,
			String strEmpNo, String strEmpName, String strEmpInid) {

		return commonserviceProxy.saveOrderEmpInfo(strCompId, strBillId,
				strEmpNo, strEmpName, strEmpInid);
	}

	@Override
	public String loadOrders(String openid) {

		return commonserviceProxy.loadOrders(openid);
	}

	@Override
	public String loadCompByCardNo(String strCardNo) {

		return commonserviceProxy.loadCompByCardNo(strCardNo);
	}

	@Override
	public String loadEmpInfoByComp(String strCompId, String strCardNo) {

		return commonserviceProxy.loadEmpInfoByComp(strCompId, strCardNo);
	}

	@Override
	public String loadEmpInfoByDept(String strCompId) {

		return commonserviceProxy.loadEmpInfoByDept(strCompId);
	}

	@Override
	public boolean updBillState(String strCompId, String strBillId) {

		return commonserviceProxy.updBillState(strCompId, strBillId);
	}

	@Override
	public boolean updOrderState(String strBillId) {

		return commonserviceProxy.updOrderState(strBillId);
	}

	@Override
	public String checkBillState(String strBillId) {

		return commonserviceProxy.checkBillState(strBillId);
	}

	@Override
	public boolean bandStaffInfo(String strParams) {

		return commonserviceProxy.bandStaffInfo(strParams);
	}

	@Override
	public String saveNewOrders(String strCompId, String strBillId,
			String strItemNo, String strEmpNo, int ispz, String strDate,
			String strTime, String orderPhone, String strCardNo, String openid,
			String strEmpName) {

		return commonserviceProxy.saveNewOrders(strCompId, strBillId,
				strItemNo, strEmpNo, ispz, strDate, strTime, orderPhone,
				strCardNo, openid, strEmpName);
	}

	@Override
	public String loadOrderDetal(String openid) {

		return commonserviceProxy.loadOrderDetal(openid);
	}

	@Override
	public String loadOrderById(String callbillid) {

		return commonserviceProxy.loadOrderById(callbillid);
	}

	@Override
	public String loadOrderByEmp(String strCompId, String strEmpNo,
			String orderDate, String orderTime) {

		return commonserviceProxy.loadOrderByEmp(strCompId, strEmpNo,
				orderDate, orderTime);
	}

	@Override
	public String loadOrderByOpenId(String openId, String orderDate,
			String orderTime) {

		return commonserviceProxy.loadOrderByOpenId(openId, orderDate,
				orderTime);
	}

	@Override
	public String loadNewEmpInfoByComp(String strCompId, String strCardNo,
			int billtype) {

		return commonserviceProxy.loadNewEmpInfoByComp(strCompId, strCardNo,
				billtype);
	}

	@Override
	public String loadStartHairInfo(String strCompId) {

		return commonserviceProxy.loadStartHairInfo(strCompId);
	}

	@Override
	public String loadStartBeautyInfo(String strCompId) {

		return commonserviceProxy.loadStartBeautyInfo(strCompId);
	}

	@Override
	public String checkUser(String strCompId, String userName, String pwd) {

		return commonserviceProxy.checkUser(strCompId, userName, pwd);
	}

	@Override
	public String saveInventory(String strCompId, String userId,
			String strParams) {
		return commonserviceProxy.saveInventory(strCompId, userId, strParams);
	}

	@Override
	public String addInventory(String strCompId) {

		return commonserviceProxy.addInventory(strCompId);
	}

	@Override
	public String checkGoodBar(String strCompId, String strGoodBar) {

		return commonserviceProxy.checkGoodBar(strCompId, strGoodBar);
	}

	@Override
	public String deleteInventoryByInventBill(String strCompId,
			String inventBill) {
		return commonserviceProxy.deleteInventoryByInventBill(strCompId,
				inventBill);
	}

	@Override
	public String deleteInventoryByBill(String strCompId, String bill) {

		return commonserviceProxy.deleteInventoryByBill(strCompId, bill);
	}

	@Override
	public String findGoodBarInfo(String goodBarNo) {
		return commonserviceProxy.findGoodBarInfo(goodBarNo);
	}
}
